---@class RedRob.Actor
local Actor = RedRob.CreateClass("Actor")
function Actor:ctor(_type)
    self.actorType = _type
end
function Actor:BaseCreate()
    self.id = 0
    self.name = ""
    self.pos = Vector3.GetCacheVec()
    self.isDead = false
    self.isDestroyed = false
    self.isLeft = false
    self.isCanDestroyed = true
    self:OnCreate()
end
function Actor:BaseDestroy()
    self.isDestroyed = true
    self.isDead = true
    Vector3.ReturnToPool(self.pos)
    self.pos = nil
    self:OnDestroy()
end
function Actor:CanDestroyed()
    return self.isCanDestroyed
end
function Actor:SetCanDestroyed(destroy)
    self.isCanDestroyed = destroy
end
function Actor:SetDead()
    self.isDead = true
end
function Actor:IsDead()
    return self.isDead
end
function Actor:GetId()
    return self.id
end
function Actor:GetName()
    return self.name
end
function Actor:GetPos()
    return self.pos
end
function Actor:SetPos(x,y)
    self.pos:Set(x,y,0)
end
function Actor:SetPosByVec(pos)
    self:SetPos(pos.x,pos.y)
end
function Actor:SetDir(isLeft)
    self.isLeft = isLeft
end
function Actor:IsType(actorType)
    return self.actorType == actorType
end

--region 子类重写方法
function Actor:OnCreate()

end
function Actor:OnDestroy()

end
function Actor:Update(dt)

end
--endregion 子类重写方法

